package com.travel.model.dto.service;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
//服务dto 服务id 服务名称 服务描述 服务类型 价格 城市 地址 联系方式 详细信息 服务图片url 服务状态 平均评分 评论数量
@Data
@Schema(description = "服务DTO")
public class ServiceDTO {
    
    @Schema(description = "服务ID（创建时不需要填写）", accessMode = Schema.AccessMode.READ_ONLY)
    private Long id;
    
    @NotBlank(message = "服务名称不能为空")
    @Schema(description = "服务名称", required = true, example = "东方明珠一日游")
    private String name;
    
    @Schema(description = "服务描述", example = "东方明珠塔观光+外滩漫步")
    private String description;
    
    @NotBlank(message = "服务类型不能为空")
    @Schema(description = "服务类型", required = true, example = "TOUR", 
           allowableValues = {"TOUR", "GUIDE", "HOTEL", "RESTAURANT"})
    private String type;
    
    @NotNull(message = "价格不能为空")
    @Schema(description = "价格", required = true, example = "299.99")
    private BigDecimal price;
    
    @NotBlank(message = "城市不能为空")
    @Schema(description = "城市", required = true, example = "上海")
    private String city;
    
    @Schema(description = "地址", example = "上海市浦东新区世纪大道1号")
    private String address;
    
    @Schema(description = "联系方式", example = "13800138000")
    private String contactInfo;
    
    @Schema(description = "详细信息", example = "包含东方明珠塔门票和专业导游服务")
    private String details;
    
    @Schema(description = "服务图片URL", 
           example = "http://pic.maxtral.fun/Onedrive/2024/12/18/default-service.jpg")
    private String imageUrl;
    
    @Schema(description = "服务状态（只读）", example = "1", 
           accessMode = Schema.AccessMode.READ_ONLY)
    private Integer status;
    
    @Schema(description = "平均评分（只读）", example = "4.5", 
           accessMode = Schema.AccessMode.READ_ONLY)
    private Double averageRating;
    
    @Schema(description = "评论数量（只读）", example = "10", 
           accessMode = Schema.AccessMode.READ_ONLY)
    private Integer commentCount;
} 